<template>
    <div class="">
        <el-table :data="tableData" style="width: 100%">
            <el-table-column v-for="item in tableLable" :key="item.lable" :prop="item.prop" :label="item.lable" :width="item.width" />
            <el-table-column fixed="right" label="Operations" width="120">
                <template #default>
                    <el-button type="primary" size="small">新增</el-button>
                    <el-button type="primary" size="small">修改</el-button>
                </template>
            </el-table-column>
        </el-table>
    </div>
</template>

<script setup lang = 'ts'>
import { defineProps} from "vue"
type lable={
    label:string,
    prop:string,
    width:string
}
type obj = {
    tableData:object|Array<unknown>
}
const props = defineProps<{
    tableData:any,
    tableLable:lable
}>()

console.log(props.tableData);

</script>

<style lang="less" scoped>

</style>
